/*
 *  Copyright 2009 Jamie Gennis <jgennis@gmail.com>.
 * 
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 * 
 *       http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *  under the License.
 */

package com.google.code.gwt.remoteaction.batch.server;

import com.google.code.gwt.remoteaction.batch.client.Service;

/**
 * The server-side implementation of the test service.
 *
 * @author Jamie Gennis <jgennis@gmail.com>
 */
public class ServiceImpl implements Service {

  public int get2(int two) {
    if (two == 2)
      return 2;
    else
      throw new IllegalArgumentException();
  }

  public int get3(int three) {
    if (three == 3)
      return 3;
    else
      throw new IllegalArgumentException();
  }

  public int get5(int five) {
    if (five == 5)
      return 5;
    else
      throw new IllegalArgumentException();
  }

  public int get7(int seven) {
    if (seven == 7)
      return 7;
    else
      throw new IllegalArgumentException();
  }

  public int get11(int eleven) throws Exception11 {
    if (eleven == 11)
      throw new Exception11();
    else
      throw new IllegalArgumentException();
  }
}
